<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS过渡练习-进度条</title>
    <style>
        .bar {
            width: 200px;
            height: 20px;
            border: 2px solid black;
            border-radius: 10px;
            margin: 0 auto;
        }
        .bar-in {
            width: 0px;
            height: 20px;
            background-color: red;
            border-radius: 10px;
            transition: width 3s;
        }
        .bar:hover .bar-in {
            width: 100%;
        }
    </style>
</head>
<body>
    <div class="bar">
        <div class="bar-in"></div>
    </div>
</body>
</html>